package com.study.statictest;

/**
 * 1.静态变量
 */
public class StaticTest {
    public static void main(String[] args) {
        for(int i = 0; i < 3; i++){
            new Thread(new InnerStaticSimpleDateFormat(), "测试线程").start();

        }
    }

    public static class InnerStaticSimpleDateFormat  implements Runnable {
        @Override
        public void run() {
            while(true) {
                try {
                    Thread.sleep(3000);
                    System.out.println(Thread.currentThread().getName()
                            +":"+DateUtil.parseToDate("2017-07-27 08:02:20"));
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
